﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using DapperExtensions.Mapper;
namespace LS.Entitys
{
    /// <summary>
    /// 用户角色表
    /// </summary>
    [Table("sys_userrole")]
    public class SysUserRoleEntity:EntityBase
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 角色代码
        /// </summary>
        public string RoleCode { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        public string RoleName { get; set; }
    }
    public class SysUserRoleEntityMapper : ClassMapper<SysUserRoleEntity>
    {
        public SysUserRoleEntityMapper()
        {
            Table("sys_userrole");
            Map(m=>m.RoleCode).Ignore();
            AutoMap();
        }
    }
}
